/*
 * The Course class is the key component for handling course related activities.
 * Users can define and modify attributes for each course they are taking.
 */
public class Course 
{
	private double myID;
	private String myName;
	private Teacher myTeacher;

	// We will allow the creation of an empty Course to be modified later.
	public Course()
	{
		assignValues(0, "[Undefined]", new Teacher());
	
	}
	public Course(int courseID, String name, Teacher teacher)
	{
		assignValues(courseID, name, teacher);
	}

	private void assignValues(int id, String name, Teacher teacher)
	{
		myID = id;
		myName = name;
		myTeacher = teacher;
	}
	
	public void setID(int newID)
	{
		myID = newID;
	}
	
	public double getID()
	{
		return myID;
	}
	
	public void setName(String newName)
	{
		myName = newName;
	}
	
	public String getName()
	{
		return myName;
	}
	
	public void setTeacher(Teacher newTeacher)
	{
		myTeacher = newTeacher;
	}
	
	public Teacher getTeacher()
	{
		return myTeacher;
	}
	
	// Allows the modification of every course attribute.
	public void modifyCourse(int courseID, String name, Teacher teacher)
	{
		setID(courseID);
		setName(name);
		setTeacher(teacher);
	}
	
	// Print information about this object.
	public String toString()
	{
		String courseInfo = "";
		
		courseInfo += "Course: " + getName() + " (" + getID() + ") \n" + "Taught by " + getTeacher();
		
		return courseInfo;
		
	}

}
